import fetch from '@/utils/fetch';

export function getList(query) {
    query._ts = (new Date()).getTime();
    return fetch({
        url: '/operator/author/list',
        method: 'get',
        params: query
    });
}

export function getDetail(authorId) {
    var _ts = (new Date()).getTime();
    return fetch({
        url: '/operator/author/detail',
        method: 'get',
        params: {
            authorId,
            _ts
        }
    });
}

export function add(author) {
    return fetch({
        url: '/operator/author/add',
        method: 'post',
        data: author
    });
}

export function update(author) {
    return fetch({
        url: '/operator/author/update',
        method: 'post',
        data: author
    });
}